-@page_title = :sent_messages.l

- if @messages.empty?
  = :no_messages.l
- else
  %table.table.table-bordered
    - @messages.each do |message|
      %tr
        %td.col-sm-1
          %fieldset.inline= check_box_tag "delete[]", message.id
        %td.col-sm-2
          = :to.l
          \:
          = link_to h(message.recipient.login), user_path(message.recipient)
          %br
          = link_to image_tag( message.recipient.avatar_photo_url(:thumb), :alt => message.recipient.login , :class => 'thumbnail'), user_path(message.recipient), :title => :users_profile.l(:user => message.recipient.login)
        %td
          = link_to h(message.subject), user_message_path(message.sender, message)
          %br
        %td.col-sm-2
          = time_ago_in_words_or_date(message.created_at)
  = submit_tag :delete_selected.l, :class => 'btn btn-danger'
  =paginate @messages, :theme => 'bootstrap'
